<{include file="admin:common/header.html"}>
<div class="page-title">
    <table width="100%" align="center" cellpadding="0" cellspacing="0" >
        <tr>
            <td width="30" align="right"><img src="<{$pager.url}>/images/main-h5-ico.gif" alt="" /></td>
            <th><{$MOD.title}></th>
            <td align="right"><{link ctl="home/package:index" arg0=$tuan_id priv="hidden" class="button"}></td>
            <td width="15"></td>
        </tr>
    </table>
</div>
<div class="page-data"><form action="?home/package-create-<{$tuan_id}>.html" mini-form="package-form" method="post" >
        <table width="100%" border="0" cellspacing="0" class="table-data form">
            <tr><th><span class="red">*</span>套餐标题：</th><td><input type="text" name="data[title]" value="<{$detail.title|default:''}>" class="input w-300"/></td></tr>
            <tr>
                <th><span class="red">*</span>户型图：</th>
                <td>
                    <input type="text" name="data[huxing_id]" value="<{$detail.huxing_id|default:''}>" id="case_huxing_id" class="input w-100"/>
                    <{link ctl="home/photo:dialog" arg0=$detail.home_id arg1=1 class="button" id="select_huxing_btn"}>
                </td>
            </tr>
            <tr><th><span class="red">*</span>单价：</th><td><input type="text" name="data[price]" value="<{$detail.price|default:''}>" class="input w-100"/></td></tr>
            <tr><th><span class="red">*</span>总价：</th><td><input type="text" name="data[total_price]" value="<{$detail.total_price|default:''}>" class="input w-100"/></td></tr>
            <tr><th class="clear-th-bottom"></th><td class="clear-td-bottom" colspan="10"><input type="submit" class="bt-big" value="提交数据" /></td></tr>
        </table>
    </form></div>
<script type="text/javascript">
    (function(K, $) {
        $("#select_huxing_btn").click(function(e) {
            e.stopPropagation();
            e.preventDefault();
            var home_id = "<{$detail.home_id}>";

            var link = $(this).attr("action") || $(this).attr("href");
            link += "&SO[home_id]=" + home_id;
            Widget.Dialog.Select(link, 'N', function(ret) {
                $("#case_huxing_id").val(ret[0]);
                $("#case_huxing_id").attr("photo", "<{$pager.img}>/" + ret[1].photo + "_thumb.jpg");
            }, {title: "请选择户型图", width: 700});
        });
    })(window.KT, window.jQuery);
</script>
<{include file="admin:common/footer.html"}>